using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;

namespace ConsoleApplication2.Models.Mapping
{
    public class INT_LOGMap : EntityTypeConfiguration<INT_LOG>
    {
        public INT_LOGMap()
        {
            // Primary Key
            this.HasKey(t => t.ID);

            // Properties
            this.Property(t => t.Type)
                .HasMaxLength(10);

            this.Property(t => t.Status)
                .HasMaxLength(2);

            this.Property(t => t.Result_H)
                .HasMaxLength(50);

            this.Property(t => t.Result_M)
                .HasMaxLength(50);

            this.Property(t => t.Casenb)
                .HasMaxLength(20);

            this.Property(t => t.Result_Value)
                .HasMaxLength(20);

            this.Property(t => t.Flag)
                .HasMaxLength(20);

            // Table & Column Mappings
            this.ToTable("INT_LOG");
            this.Property(t => t.ID).HasColumnName("ID");
            this.Property(t => t.Type).HasColumnName("Type");
            this.Property(t => t.Date).HasColumnName("Date");
            this.Property(t => t.Status).HasColumnName("Status");
            this.Property(t => t.Result_H).HasColumnName("Result_H");
            this.Property(t => t.Result_M).HasColumnName("Result_M");
            this.Property(t => t.Casenb).HasColumnName("Casenb");
            this.Property(t => t.Request_ID).HasColumnName("Request_ID");
            this.Property(t => t.Result_Value).HasColumnName("Result_Value");
            this.Property(t => t.Flag).HasColumnName("Flag");
        }
    }
}
